package br.com.dev.tcc.builder;

import java.util.ArrayList;
import java.util.List;

import android.app.Activity;
import br.com.dev.tcc.R;
import br.com.dev.tcc.bean.UtilitariosViewItem;
import br.com.dev.tcc.view.utilitarios.UtilitariosAlcoolGasolinaView;
import br.com.dev.tcc.view.utilitarios.UtilitariosTabelaIpvaView;
import br.com.dev.tcc.view.utilitarios.UtilitariosTabelaRodizioView;

public class UtilitariosViewsBuilder {

	private List<UtilitariosViewItem> itens;
	private Activity activity;
	private UtilitariosViewItemBuilder viewBuilder;

	public UtilitariosViewsBuilder(Activity activity) {

		this.activity = activity;
		buildItens();
	}

	private void buildItens() {

		itens = new ArrayList<UtilitariosViewItem>();

		viewBuilder = new UtilitariosViewItemBuilder();

		buildAlcoolGasItem();
		buildIpvaItem();
		buildRodizioSpItem();
	}

	private void buildAlcoolGasItem() {

		itens.add(viewBuilder.viewToInflate(new UtilitariosAlcoolGasolinaView(activity))
				.text(activity.getResources().getString(R.string.alcool_gas))
				.icon(R.drawable.gas).create());
	}

	private void buildIpvaItem() {

		itens.add(viewBuilder.viewToInflate(new UtilitariosTabelaIpvaView(activity))
				.text(activity.getResources().getString(R.string.tabela_ipva))
				.icon(R.drawable.calendar).create());
	}

	private void buildRodizioSpItem() {

		itens.add(viewBuilder.viewToInflate(new UtilitariosTabelaRodizioView(activity))
				.text(activity.getResources().getString(R.string.tabela_rodizio_sp))
				.icon(R.drawable.no_car_sign).create());
	}

	public List<UtilitariosViewItem> getViews() {

		return itens;
	}
}
